<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDiysTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('diys', function (Blueprint $table) {
            $table->id()->comment('DIY数据表');
            $table->string('version',32)->nullable()->comment('版本号');
            $table->string('name',32)->comment('页面名称');
            $table->string('template_name',32)->comment('模板名称');
            $table->text('default_value')->comment('页面数据');
            $table->text('value')->nullable()->comment('页面默认数据');
            $table->string('type',32)->nullable()->comment('页面类型');
            $table->tinyInteger('status')->default(0)->comment('状态 0不使用 1使用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('diys');
    }
}
